Skip to content

导出OLA图像到目录 - ExportOlaImageDir

函数简介

将OLA数据库中指定目录的图像数据批量导出到目标目录。

接口名称

ExportOlaImageDir

DLL调用

cpp
int ExportOlaImageDir(long ola, const long db, string dir, string exportDir);

参数说明

参数名类型说明
ola长整型数OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成
db长整型数数据库连接句柄,由 OpenDatabase 接口生成
dir字符串数据库中的图片目录路径
exportDir字符串导出的目标目录路径

示例

SDK 调用

cpp
#include "OLAPlugServer.h"

OLAPlugServer ola;
int ret = ola.ExportOlaImageDir(0, "value", "value");
csharp
using OLAPlug;

var ola = new OLAPlugServer();
int ret = ola.ExportOlaImageDir(0, "value", "value");
python
from OLAPlugServer import OLAPlugServer

ola = OLAPlugServer()
ret = ola.ExportOlaImageDir(0, "value", "value")
java
import com.olaplug.OLAPlugServer;

OLAPlugServer ola = new OLAPlugServer();
int ret = ola.ExportOlaImageDir(0, "value", "value");
cpp
var ola = com("OlaPlug.OlaSoft")
var ret = ola.ExportOlaImageDir(0, "value", "value")
vbscript
Set ola = CreateObject("OlaPlug.OlaSoft")
ret = ola.ExportOlaImageDir(0, "value", "value")
text
.局部变量 ola, OLAPlug
ola.创建 ()
ret = ola.ExportOlaImageDir(0, “value”, “value”)
aardio
import OLAPlugServer;
var ola = OLAPlugServer();
var ret = ola.ExportOlaImageDir(0, "value", "value");
text
变量 ola <类型 = OLAPlugServer>
ola = 新建 OLAPlugServer
整数 ret = ola.ExportOlaImageDir(0, "value", "value")
cpp
#include "OLAPlugServer.h"

OLAPlugServer ola;
int32_t ret = ola.ExportOlaImageDir(0, "value", "value");

原生 DLL 调用

cpp
long instance = CreateCOLAPlugInterFace();
ExportOlaImageDir(instance, 0, "value", "value");
csharp
using System.Runtime.InteropServices;
using System.Text;

[DllImport("OLAPlug_x64.dll", CallingConvention = CallingConvention.StdCall)]
static extern long CreateCOLAPlugInterFace();
[DllImport("OLAPlug_x64.dll", CallingConvention = CallingConvention.StdCall)]
static extern int ExportOlaImageDir(long ola, long db, string dir, string exportDir);

long instance = CreateCOLAPlugInterFace();
ExportOlaImageDir(instance, 0, "value", "value");
python
from ctypes import CDLL, c_int, c_int64, create_string_buffer

ola = CDLL("OLAPlug_x64.dll")
ola.CreateCOLAPlugInterFace.restype = c_int64
instance = ola.CreateCOLAPlugInterFace()
ola.ExportOlaImageDir(instance, 0, "value", "value")

返回值

操作结果。成功返回 1,失败返回 0

注意事项

  • 适用于批量导出图像数据的场景。
  • 如果导出失败,可通过 GetDatabaseError 获取详细错误信息。
  • 确保目标目录有足够的存储空间。
  • 确保数据库中的图片目录路径正确且图像数据存在。